<template>
  <div class="registered-header">
    <van-icon name="home-o" size='24' class="left" @click="$router.push('/index')" v-show="isshow"/>
    <h3>{{title}}</h3>
    <span class="right" @click="handleClick">{{right}}</span>
  </div>
</template>

<script>
export default {
  props: ['isshow', 'title', 'right'],
  methods: {
    handleClick () {
      this.$emit('click')
    }
  },
  mounted () {
    document.body.style.background = '#f5f5f5'
  },
  destroyed () {
    document.body.style.background = '#ffffff'
  }
}
</script>
<style lang="scss">
  body{
    background: #f5f5f5
  }
  .registered-header{
    height: 44px;
    background: #ffffff;
    line-height: 44px;
    box-sizing: border-box;
    position: relative;
    padding: 0 10px;
    border-bottom: 1px solid #f5f5f5;
    h3{
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%,-50%);
      font-size: 17px;
    }
    .left{
      position: absolute;
      left: 10px;
      top: 12px
    }
    .right{
      position: absolute;
      right: 10px;
      font-size: 15px;
    }
  }
</style>
